Biror shart bajarish uchun if operatorlaridan foydalanishingiz mumkin va shart operatori deyarli barcha dasturlarda ishtirok etadi. Shart operatori 3 qismdan iborat (if, elif, else).
Kod bloklarini chegaralash uchun shart operatoridan pastki qism 4 ta bo'sh joy yoki 1 ta tabulyatsiyadan boshlanadi.
Agar ifoda rost bo'lsa shart operatori pastki qismidagi kod ishga tushadi, aks holda e'tiborsiz qoldiriladi.
x = 7 if x == 7: print("x 7 ga teng") x 7 ga teng
Shartlar bajarilishida birinchi if operatoridan foydalaniladi.So'ng elif yoki else operatorlaridan foydalanishingiz yoki foydalanmasligingiz mumkin.
Nima uchun elif operatori kerak? ⚠️ Agar hamma shartga if operatorini qo'llasak hamma shart operatorlari ishga tushadi.Agar birinchi shartga if shart operatori boshqa shartlarga elif shart operatoridan foydalansak elif shart operatori ishga tushsa qolgan operatorlar e'tiborsiz qoldiriladi.Quyidagi kodda 'x 18 ga teng' chop etilmadi sabab undan yuqoridagi elif operatori bajarildi.
x = 18 if x == 22: print("x 22 ga teng") elif x < 22: print("x 22 dan kichik") elif x == 18: print("x 18 ga teng") else: print("Yuqoridagi shartlar ishga tushmadi")
x 22 dan kichik
else shart operatori boshqa holatlarda ishga tushadi.
x = 18 if x == 22: print("x 22 ga teng") elif x < 11: print("x 11 dan kichik") elif x == 15: print("x 15 ga teng") else: print("Yuqoridagi shartlar ishga tushmadi")
Biror shart bajarish uchun if operatorlaridan foydalanishingiz mumkin va shart operatori deyarli barcha dasturlarda ishtirok etadi. Shart operatori 3 qismdan iborat (if, elif, else).
Kod bloklarini chegaralash uchun shart operatoridan pastki qism 4 ta bo'sh joy yoki 1 ta tabulyatsiyadan boshlanadi.
Agar ifoda rost bo'lsa shart operatori pastki qismidagi kod ishga tushadi, aks holda e'tiborsiz qoldiriladi.
x = 7 if x == 7: print("x 7 ga teng") x 7 ga teng
Shartlar bajarilishida birinchi if operatoridan foydalaniladi.So'ng elif yoki else operatorlaridan foydalanishingiz yoki foydalanmasligingiz mumkin.
Nima uchun elif operatori kerak? ⚠️ Agar hamma shartga if operatorini qo'llasak hamma shart operatorlari ishga tushadi.Agar birinchi shartga if shart operatori boshqa shartlarga elif shart operatoridan foydalansak elif shart operatori ishga tushsa qolgan operatorlar e'tiborsiz qoldiriladi.Quyidagi kodda 'x 18 ga teng' chop etilmadi sabab undan yuqoridagi elif operatori bajarildi.
x = 18 if x == 22: print("x 22 ga teng") elif x < 22: print("x 22 dan kichik") elif x == 18: print("x 18 ga teng") else: print("Yuqoridagi shartlar ishga tushmadi")
x 22 dan kichik
else shart operatori boshqa holatlarda ishga tushadi.
x = 18 if x == 22: print("x 22 ga teng") elif x < 11: print("x 11 dan kichik") elif x == 15: print("x 15 ga teng") else: print("Yuqoridagi shartlar ishga tushmadi")
Telegram auto-delete message, expiring invites, and more
elegram is updating its messaging app with options for auto-deleting messages, expiring invite links, and new unlimited groups, the company shared in a blog post. Much like Signal, Telegram received a burst of new users in the confusion over WhatsApp’s privacy policy and now the company is adopting features that were already part of its competitors’ apps, features which offer more security and privacy. Auto-deleting messages were already possible in Telegram’s encrypted Secret Chats, but this new update for iOS and Android adds the option to make messages disappear in any kind of chat. Auto-delete can be enabled inside of chats, and set to delete either 24 hours or seven days after messages are sent. Auto-delete won’t remove every message though; if a message was sent before the feature was turned on, it’ll stick around. Telegram’s competitors have had similar features: WhatsApp introduced a feature in 2020 and Signal has had disappearing messages since at least 2016.
The STAR Market, as is implied by the name, is heavily geared toward smaller innovative tech companies, in particular those engaged in strategically important fields, such as biopharmaceuticals, 5G technology, semiconductors, and new energy. The STAR Market currently has 340 listed securities. The STAR Market is seen as important for China’s high-tech and emerging industries, providing a space for smaller companies to raise capital in China. This is especially significant for technology companies that may be viewed with suspicion on overseas stock exchanges.